package com.fowo.api.controller.purchase.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class purchaseReturnArgsDTO {


    @JsonProperty("fromMap")
    private FromMapDTO fromMap;
    @JsonProperty("children")
    private List<ChildrenDTO> children;
    @JsonProperty("toMap")
    private ToMapDTO toMap;

    @NoArgsConstructor
    @Data
    public static class FromMapDTO {
        @JsonProperty("purchase_quantity")
        private Integer purchaseQuantity;
        @JsonProperty("id")
        private Long id;
        @JsonProperty("a_status")
        private String aStatus;
        @JsonProperty("del_flag")
        private Boolean delFlag;
        @JsonProperty("create_time")
        private String createTime;
        @JsonProperty("arrival_status")
        private String arrivalStatus;
        @JsonProperty("last_update_time")
        private String lastUpdateTime;
        @JsonProperty("warehouse_name")
        private String warehouseName;
        @JsonProperty("last_update_user")
        private Long lastUpdateUser;
        @JsonProperty("oversight_uid")
        private String oversightUid;
        @JsonProperty("create_user")
        private Long createUser;
        @JsonProperty("supplier_id")
        private Long supplierId;
        @JsonProperty("opt_uid")
        private Long optUid;
        @JsonProperty("quantity_received")
        private Long quantityReceived;
        @JsonProperty("wid")
        private Long wid;
        @JsonProperty("stauts")
        private String stauts;
        @JsonProperty("supplierName")
        private String supplierName;
        @JsonProperty("purchase_order_code")
        private String purchaseOrderCode;
        @JsonProperty("inspection_type")
        private String inspectionType;
        @JsonProperty("fee_part_type")
        private String feePartType;
    }

    @NoArgsConstructor
    @Data
    public static class ToMapDTO {
        @JsonProperty("order_no")
        private String orderNo;
        @JsonProperty("return_method")
        private String returnMethod;
        @JsonProperty("shipping_price")
        private Integer shippingPrice;
        @JsonProperty("return_reason")
        private String returnReason;
        @JsonProperty("creator_time")
        private Long creatorTime;
        @JsonProperty("remark")
        private String remark;
        @JsonProperty("purchase_order_code")
        private String purchaseOrderCode;
        @JsonProperty("wid")
        private Long wid;
        @JsonProperty("creator_user")
        private Long creatorUser;
        @JsonProperty("application_date")
        private Long applicationDate;
        @JsonProperty("id")
        private Long id;
        @JsonProperty("supplier_id")
        private Long supplierId;
        @JsonProperty("other_fee")
        private Long otherFee;
        @JsonProperty("status")
        private String status;
    }

    @NoArgsConstructor
    @Data
    public static class ChildrenDTO {
        @JsonProperty("fromMap")
        private FromMapDTO fromMap;
        @JsonProperty("toMap")
        private ToMapDTO toMap;

        @NoArgsConstructor
        @Data
        public static class FromMapDTO {
            @JsonProperty("purchase_order_id")
            private Long purchaseOrderId;
            @JsonProperty("quantity_received")
            private Long quantityReceived;
            @JsonProperty("quantity_receive")
            private Long quantityReceive;
            @JsonProperty("product_id")
            private Long productId;
            @JsonProperty("id")
            private Long id;
            @JsonProperty("sku")
            private String sku;
            @JsonProperty("del_flag")
            private Boolean delFlag;
            @JsonProperty("application_num")
            private Long applicationNum;
            @JsonProperty("pic_url")
            private String picUrl;
            @JsonProperty("plan_sn")
            private String planSn;
        }

        @NoArgsConstructor
        @Data
        public static class ToMapDTO {
            @JsonProperty("product_sku")
            private String productSku;
            @JsonProperty("quantity")
            private Long quantity;
            @JsonProperty("purchase_order_product_id")
            private Long purchaseOrderProductId;
            @JsonProperty("parent_id")
            private Long parentId;
            @JsonProperty("product_id")
            private Long productId;
            @JsonProperty("deduction_amount")
            private String deductionAmount;
            @JsonProperty("remark")
            private String remark;
            @JsonProperty("id")
            private Long id;
            @JsonProperty("pic_url")
            private String picUrl;
        }
    }
}
